#include "process.h"

void ProcessOn()
{
    char bar[NUM];
    memset(bar, ' ', sizeof(bar));
    bar[NUM - 1] = '\0';

    const char* label = "|\\-/";

    int cnt = 0;
    while(cnt <= NUM - 1)
    {
       printf("[%s][%d%%][%c]\r", bar, cnt, label[cnt%4]);
        fflush(stdout);
        usleep(50000);
        bar[cnt++] = STYLE;
    }
    bar[NUM - 1] = '\0';
    printf("\n");
}
